/**
 * editor_plugin_src.js
 *
 * Copyright 2009, Moxiecode Systems AB
 * Released under LGPL License.
 *
 * License: http://tinymce.moxiecode.com/license
 * Contributing: http://tinymce.moxiecode.com/contributing
 */

(function() {

	tinymce.create('tinymce.plugins.BoneImagePlugin', {
		init : function(ed, url) {

			ed.addCommand('mceBoneImage', function() {
				ed.windowManager.open({
					file : url + '/boneimage.html',
					width : 700 + parseInt(ed.getLang('images.delta_width', 0)),
					height : 550 + parseInt(ed.getLang('images.delta_height', 0)),
					inline: true,
					popup_css : false
				}, {
					plugin_url : url
				});
			});

			// Register buttons
			ed.addButton('boneimage', {
				title : '上传图像',
				cmd : 'mceBoneImage',
				image : url + '/images/icon.gif'
			});
		},

		getInfo : function() {
			return {
				longname : '骨头图像上传',
				author : 'Lou Barnes',
				authorurl : 'http://www.loubarnes.com',
				infourl : 'http://product.1024i.com/tinymce/boneimage/',
				version : '1.0'
			};
		}

	});

	// Register plugin
	tinymce.PluginManager.add('mceBoneImage', tinymce.plugins.BoneImagePlugin);

})();